import request from '@/plugin/axios'

export function queryDicts (data) {
  return request({
    url: '/v1/dict/page',
    method: 'post',
    data
  })
}

export function addDict (data) {
  return request({
    url: '/v1/dict/add',
    method: 'post',
    data
  })
}

export function updateDict (id, data) {
  return request({
    url: `/v1/dict/updateById/${id}`,
    method: 'post',
    data
  })
}

export function removeDict (data) {
  return request({
    url: `/v1/dict/deleteByIds`,
    method: 'post',
    data
  })
}

export function queryDictDetailsByName (name) {
  return request({
    url: `/v1/dict/queryDetailsByName/${name}`,
    method: 'post'
  })
}
